const {buildErrObject} = require('../../../utils/buildErrObject');
const nodemailer = require("nodemailer");
const buildTransport = async function(user = {}) {
    return new Promise((resolve, reject) => {
        resolve(nodemailer.createTransport({
            // host: 'smtp.163.com',
            service: "qq", //邮箱类型 例如service:'163'
            secure: true, //是否使用安全连接，对https协议的
            // port: 465, //qq邮件服务所占用的端口
            auth: {
                user: "1050195858@qq.com",//开启SMTP的邮箱，发件人
                pass: "qjazwzkgokcjbcea"// qq授权码
            }
        }))
    })
};

module.exports = {buildTransport}